Fast dynamic casting
نویسندگان
چکیده
We describe a scheme for implementing dynamic casts suitable for systems where the performance and predictability of performance is essential. A dynamic cast from a base class to a derived class in an objectoriented language can be performed quickly by having the linker assign an integer type ID to each class. A simple integer arithmetic operation verifies whether the cast is legal at run time. The type ID scheme presented uses the modulo function to check that one class derives from another. A 64-bit type ID is sufficient to handle class hierarchies of large size at least nine levels of derivation deep. We also discuss the pointer adjustments required for a C++ dynamic cast. All examples will be drawn from the C++ language. Copyright c © 2005 John Wiley & Sons, Ltd.
منابع مشابه
Interactive and Scalable Ray-Casting of Metaballs on the GPU
Metaballs are a useful technique to model blobby surfaces. Because metaballs define an implicit surface, rendering is difficult. We seek to render the surface directly via ray-casting, to precisely locate the isosurfaces and preserve the concise representation of the surface. To perform this rendering at interactive rates on dynamic data, we will use acceleration structures for fast surface cal...
متن کاملFast Projection-Based Ray-Casting Algorithm for Rendering Curvilinear Volumes
ÐWe present an efficient and robust ray-casting algorithm for directly rendering a curvilinear volume of arbitrarily-shaped cells. By projecting cell-faces onto the image plane, we have effectively addressed three critical steps of the ray-casting process, namely finding the entry cell-faces for a ray, traversing along the ray from one cell to another, and reconstructing data values at the ray/...
متن کاملA real-time dynamic holographic material using a fast photochromic molecule
We have developed a real-time, dynamic holographic material that exhibits rapid colouration upon irradiation with UV light and successive fast thermal bleaching within tens of milliseconds at room temperature. Photochromic polymer films were prepared by a simple solution-casting method from the benzene solution of the mixture of the photochromic molecule, poly(ethyl acrylate), and poly(phenoxye...
متن کاملDynamic Grid Refinement for Fluid Simulations on Parallel Graphics Architectures
We present a physically-based fluid simulation with dynamic grid refinement on parallel SIMD graphics hardware. The irregular and dynamic structure of an adaptive grid requires sophisticated memory access patterns as well as a decomposition of the problem for parallel processing and the distribution of tasks to multiple threads. In this paper, we focus on the representation and management of th...
متن کاملPractical and Verifiable C++ Dynamic Cast for Hard Real-Time Systems
Damian Dechev, Rabi Mahapatra, Bjarne Stroustrup The dynamic cast operation allows flexibility in the design and use of data management facilities in object-oriented programs. Dynamic cast has an important role in the implementation of the Data Management Services (DMS) of the Mission Data System Project (MDS), the Jet Propulsion Laboratory’s experimental work for providing a state-based and go...
متن کاملSpeech recognition with dynamic grammars using finite-state transducers
Spoken language systems, ranging from interactive voice response (IVR) to mixed-initiative conversational systems, make use of a wide range of recognition grammars and vocabularies. The recognition grammars are either static (created at design time) or dynamic (dependent on database lookup at run time). This paper examines the compilation of recognition grammars with an emphasis on the dynamic ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Softw., Pract. Exper.
دوره 36 شماره
صفحات -
تاریخ انتشار 2006